﻿@model IEnumerable<Blog>
@{
    Ajax.Dna().Widget()
        .Preview(@<text><div style="overflow: auto;">
            @for (int i = 0; i < 20; i++)
            {
                <div class="d-avatar" style="float: left; margin: 0px 2px 2px 0px;">
                    <img src="@Url.Content("~/content/images/no-avatar.gif")" width="32" height="32" alt="" title="@("user" + i.ToString())" />
                </div>
            }
        </div>
    </text>)
        .Content(@<text>
    @if (Model.Count() > 0)
    {
        <div style="overflow: auto;">
            @foreach (var blog in Model)
            {
                if (blog.Web.Type.Equals((int)WebTypes.Personal))
                {
                <div class="d-avatar" style="float: left; margin: 0px 2px 2px 0px;">
                    <a href="@blog.Url" rel="nofollow"
                title=" @(string.IsNullOrEmpty(blog.Web.Description) ? blog.Title : Html.Encode(blog.Web.Description))">
                        <img src="@Membership.GetUser(blog.Owner).GetAvatar(32)" alt="@blog.Owner" width="32" height="32"  />
                    </a>
                </div>
                }
            }
        </div>
    }
    else
    { 
        <div class="ui-state-highlight" style="padding: 20px;">
            @Html.Global("publishing", "NoBloggers")</div>
    }
    </text>
    )
    .Render();
}
